function toDou(n){
  return n<10?'0'+n:''+n;
}

module.exports={
  time2Date:function(timeStamp){
    var oDate = new Date();
    oDate.setTime(timeStamp*1000);
    return oDate.getFullYear()+'-'+toDou(oDate.getMonth()+1)+'-'+toDou(oDate.getDay())+' '+ toDou(oDate.getHours())+':'+ toDou(oDate.getMinutes())+':'+ toDou(oDate.getSeconds())
  }
}
